package com.bdcom.autotest.interaction.step;

import com.bdcom.autotest.interaction.socket.DevSocket;

public class ConnDev implements IStepHandler{

	static int counter = 0;
	
	@Override
	public boolean runStep(StepThread mainrun) {
		
		counter++;
		if( counter>1  ) {
			return true;
		}
		
		DevSocket devSocket = new DevSocket(mainrun);
		if( !devSocket.isOk()   ) {
			mainrun.addErrorLog( "无法与设备建立socket连接请检查设备是否正常启动！");
			return false;
		}else {
			mainrun.setDevSokcet(devSocket);
			return true;
		}
		
	}
	

}
